package com.liws.hellopoi;

import com.liws.hellopoi.poiReadExcel.ExcelObject;
import com.liws.hellopoi.util.ObjectList;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;

/**
 * @Author: liweisheng
 * @Dcscription:
 * @Date: 2022/1/28 15:53
 */
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = HelloPoiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class PoiReadExcel {

    @Autowired
    ExcelObject excelObject;

    @Value("${poiReadExcelObject.url}")
    private String poiReadExcelObject;

    @Test
    public void testPoiReadExcel(){
        log.info("ReadExcelFile");
        //此处为我使用的一个线程用来存储每次复选框的识别列表（目前不需要
        ObjectList.setCurrentFlag(new ArrayList());
        log.info("ReadCheckbox");
        excelObject.readCheckbox(poiReadExcelObject);

    }
}
